package commands;

import IA.InformationAggregator;
import IA.MenuItem;
import IA.Service;
import Simulation.OrderSimulator;
import java.util.ArrayList;

/**
 *
 * @author Jeremy
 */
public class CmdSimulateOrder extends Command {

    private Service _s;

    public CmdSimulateOrder(InformationAggregator ia, Service s) {
        super(ia);
        _s = s;
    }

    @Override
    public Object execute() {
        ArrayList<MenuItem> orders;
        orders = OrderSimulator.getInstance().createOrders(_s, ia.getMenu());
        for (MenuItem i : orders) {
            new CmdOrderItem(ia, _s, i).execute();
        }
        return null;
    }
}